const Index = () => import("../views/home/Index.vue");
const MemberCenter = () => import("../views/member/MemberCenter.vue");
const MemberInfo = () => import("../views/member/MemberInfo.vue");
const MemberBenefits = () => import("../views/member/MemberBenefits.vue");
const MemberTutorial = () => import("../views/member/MemberTutorial.vue");
const WeeklyPlanIntro = () => import("../views/member/WeeklyPlanIntro.vue");
const CourseScheduleIntro = () => import("../views/member/CourseScheduleIntro.vue");
const Habit21Intro = () => import("../views/member/Habit21Intro.vue");
const FunctionCards = () => import("../views/member/FunctionCards.vue");

export default [
  {
    path: "/member",
    component: Index,
    children: [
      {
        path: "",
        redirect: "/member/center"
      },
      {
        path: "center",
        component: MemberCenter,
        name: "MemberCenter",
        meta: {
          title: "会员中心",
          requiresAuth: true
        },
        children: [
          {
            path: "",
            component: MemberInfo,
            name: "MemberInfo",
            meta: {
              title: "会员信息",
              requiresAuth: true
            }
          },
          {
            path: "benefits",
            component: MemberBenefits,
            name: "MemberBenefits", 
            meta: {
              title: "会员权益",
              requiresAuth: true
            }
          },
          {
            path: "tutorial",
            component: MemberTutorial,
            name: "MemberTutorial",
            meta: {
              title: "使用教程", 
              requiresAuth: true
            }
          },
          {
            path: "weekly-plan-intro",
            component: WeeklyPlanIntro,
            name: "WeeklyPlanIntro",
            meta: {
              title: "周计划功能介绍",
              requiresAuth: true
            }
          },
          {
            path: "course-schedule-intro",
            component: CourseScheduleIntro,
            name: "CourseScheduleIntro",
            meta: {
              title: "课表功能介绍",
              requiresAuth: true
            }
          },
          {
            path: "habit-21-intro",
            component: Habit21Intro,
            name: "Habit21Intro",
            meta: {
              title: "21天好习惯介绍",
              requiresAuth: true
            }
          },
          {
            path: "function-cards",
            component: FunctionCards,
            name: "FunctionCards",
            meta: {
              title: "会员功能",
              requiresAuth: true
            }
          }
        ]
      }
    ]
  }
];